#!/bin/bash

logfile=/var/log/brozzler-worker.log
touch $logfile
chown {{user}} $logfile

source {{venv_root}}/brozzler-ve3/bin/activate

exec nice setuidgid {{user}} \
    env DISPLAY=:1 LANG=en_US.UTF-8 LC_COLLATE=C \
    brozzler-worker \
     --rethinkdb-servers={{groups['rethinkdb'] | join(',')}} \
     --max-browsers=4 \
     --trace \
     --warcprox-auto \
     >> $logfile 2>&1

